fix(@angular/build): allow disabling Vitest isolation from builder#33294
Conversation
Keep the isolate builder option undefined when it is omitted so a Vitest runner config can provide its own value. Previously, ng test --isolate worked because true was forwarded as an override, but ng test --no-isolate was normalized to false and then treated the same as an omitted option. As a result, test.isolate: true in vitest-base.config.ts stayed active. Forward explicit false values to the Vitest project config so --no-isolate can override runnerConfig while the default still aligns with the Karma/Jasmine experience.
There was a problem hiding this comment.
Code Review
This pull request updates the unit test builder to allow the isolate option to be explicitly set to false instead of defaulting to false when undefined. This ensures that a CLI option of isolate: false can override a true setting in the Vitest configuration file. A unit test has been added to verify this behavior. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Previously,
ng test --isolateworked because true was forwarded as an override, butng test --no-isolatewas normalized to false and then treated the same as an omitted option. As a result,test.isolate: trueinvitest-base.config.tsstayed active.What is the new behavior?
Keep the isolate builder option undefined when it is omitted so a Vitest runner config can provide its own value.
Forward explicit false values to the Vitest project config so
--no-isolatecan override runnerConfig while the default still aligns with the Karma/Jasmine experience.Does this PR introduce a breaking change?
Other information